﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NeedAdd.ascx.cs" Inherits="controls_admin_NeedAdd" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Thêm Nhu Cầu Mới
        </h5>
    </div>
    <!-- end box / title -->
    <div id="divMessage" runat="server">
    </div>
    <div class="form">
        <div class="fields" style="left: 300px;">
            <div class="field field-first">
                <div class="label">
                    <label for="input-small">
                        Tên Nhu Cầu
                    </label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="required medium" />
                    <div runat="server" id="NOTE_TITLE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Danh Mục
                    </label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlCategories" runat="server" CssClass="select" />
                    <div runat="server" id="NOTE_CATEGORY" class="note" />
                </div>
            </div>
            <div class="buttons">
                <asp:Button ID="btnSubmit" runat="server" Text="Thêm Mới" OnClick="btnSubmit_Click" />
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                      else
                      {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
                  }
                  else
                  {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
              }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
